home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / misc / math / graphdq.lha / GraphDQ / GraphDQ.doc < prev    next >
Encoding:
Text File  |  1980-01-13  |  13.1 KB  |  322 lines

  1. GraphDQ
  2. (c) Copyright (C) 1994 John E> Perry, ///
  3.  
  4.                               Table of Contents
  5.  
  6.           I. General Information
  7.          II. Graph Window
  8.         III. Animating
  9.          IV. Tools Window
  10.           V. Printing
  11.          VI. Palette Window
  12.         VII. Equation Window
  13.            VIII. Scale Window
  14.          IX. Run-Time Help
  15.           X. Quitting Time
  16.          XI. Troubleshooting
  17.         XII. Acknowledgements, etc.
  18.  
  19.                  General Info
  20.  
  21. GraphDQ is a program which graphs and demonstrates the flow of
  22. 2-dimensional differential equations.  You define two differential
  23. equations, x' and y', in terms of x and y, then click anywhere on the graph
  24. window, and your Amiga will generate the graph of the equation.  You can
  25. change the scale of the graph for both x and y axes, translate the graph to
  26. different points for further investigation, print out the graph, change the
  27. colors of the flow to suit your tastes, and generally have a good time
  28. exploring the fascinating world of Differential Equations.
  29.  
  30.     This program was developed while I was taking a class in graduate
  31. school at Northern Arizona University in Nonlinear Differential Equations.
  32. I needed something to check my work, and my Amiga, Sara, being such a
  33. wonderfully intuitive machine, seemed to fit the bill.  All it would take
  34. was a few hours' work.
  35.     ...famous last words, yes?
  36.     So I spent the next few months developing this program for fun, and
  37. became more and more engrossed in it, until I decided I wanted to release
  38. it as a study aid for other students.  Hope you enjoy it!
  39.  
  40.     GraphDQ probably requires 1 Meg of RAM; in fact, I'm certain of it.
  41. It also requires AmigaDOS2.0 or above.
  42.  
  43.                    LEGAL STUFF
  44. NO WARRANTY OF ANY KIND IS IMPLIED OR GIVEN.  YOU USE THE SOFTWARE
  45. INCLUDED AT YOUR OWN RISK.  IF YOU HAVE TROUBLE WITH THE SOFTWARE, FEEL
  46. FREE TO CONTACT ME AT ONE OF THE ADDRESSES BELOW AND I WILL DO MY BEST TO
  47. HELP YOU (because I like the program and I like you for caring :) BUT YOU
  48. CANNOT HOLD ME RESPONSIBLE FOR ANY DAMAGE INCURRED TO YOUR COMPUTER
  49. SYSTEM, OTHER SOFTWARE, YOUR PERSONAL RELATIONSHIPS, OR YOUR SANITY
  50. THROUGH USE OF THIS PRODUCT.  THIS PRODUCT HAS BEEN TESTED ON AN AMIGA 500
  51. MICROCOMPUTER WITH A GVP A530 TURBO, RUNNING UNDER AMIGADOS 2.1.  I HAVE
  52. TESTED THIS SOFWARE AS THOROUGHLY AS I HAVE BEEN ABLE TO DO DURING SEVERAL
  53. MONTHS' DEVELOPMENT.
  54.  
  55. THIS PROGRAM IS COPYRIGHT (C) 1994 JOHN E. PERRY, III.  THIS PROGRAM IS
  56. iNOTui IN THE PUBLIC DOMAIN BUT IS FREELY DISTRIBUTABLE.  IF YOU LIKE THIS
  57. PROGRAM AND USE IT FREQUENTLY, PLEASE SEND ME EITHER A CARD OR A SMALL
  58. DONATION ($10 US) TO HELP DEFRAY THE COST OF FURTHER DEVELOPMENT.THOSE PEOPLE
  59. WHO DONATE OR SEND A CARD WILL BE NOTIFIED OF THESE ENHANCEMENTS AND WILL
  60. BE GIVEN FREE (shipping excluded) UPGRADES.
  61.  
  62. I can be reached at any one of the addresses below:
  63.         John E> Perry, ///
  64.             TEMPORARY
  65.         Northern Arizona University Box #6220
  66.         Flagstaff, Arizona
  67.         86011
  68.             PERMANENT
  69.         124 Archer Road
  70.         Newport News, VA
  71.         23606-1102
  72.             INTERNET
  73.         jep@nauvax.ucc.nau.edu
  74.  
  75.  
  76.                  Graph Window
  77.  
  78. The Graph Window is the centerpiece of GraphDQ.  It lies at the back of the
  79. screen, and has a pair of axes on it.  In order to simplify the program and
  80. keep the graph uncluttered, the axes have no labels and no marked scale
  81. (however, that information is only a click away).  Naturally, up is
  82. positive y and right is positive x.
  83.  
  84.     You can graph the currently defined equations by clicking the mouse
  85. buttons anywhere on the graph window.  Clicking the left mouse button moves
  86. you forward in time; clicking the right button moves you backwards.
  87.     The computer will graph forever unless:
  88.         a) you hit a mouse button or press a key, or
  89.         b) the graph runs off the screen, or
  90.         c) it gets close enough to a previously-drawn trajectory
  91.             to make the two trajectories indistinguishable.
  92. When the computer has stopped graphing, it animates the flow temporarily.
  93. (You can determine the flow colors in the Palette Window.)
  94.     If you want to examine the flow, you can simply click on an
  95. existing trajectory and the computer will animate it for you.
  96.  
  97.     To exit GraphDQ, either press a key while the screen pointer looks
  98. like a cross-hair or use the Quit Button.
  99.  
  100.  
  101.                                  Tools Window
  102.  
  103. The Tools Window sits in the front of your screen, waiting for you to do
  104. something with it.  It provides access to the following functions:
  105.     
  106.         Printing the graph
  107.         Changing the flow colors
  108.         Changing the differential equations
  109.         Changing the scale or origin
  110.         Run-Time Help
  111.         Quitting
  112.  
  113. If you'd like, you can see a diagram of the Tools Window by viewing the
  114. IFF file below:
  115.             ToolsWindow.iff
  116.  
  117.  
  118.                                    Printing
  119.  
  120. Clicking on the Printer button will print the graph for you.  In order to
  121. do this, your Amiga setup must satisfy the following requirements:
  122.  
  123.         a> you must have a printer capable of graphics
  124.             output (obviously :)
  125.         b> you need to make an assignment for TOOLS:
  126.             which contains the GraphicDump command
  127.             supplied by Commodore with the AmigaDOS
  128.             operating system.  This is almost always
  129.             in the SYS:Tools/ drawer, so most people
  130.             should just have to execute the command:
  131.                 "assign TOOLS: SYS:Tools/"
  132.  
  133.     Once you click on the button, a few seconds will pass before
  134. printing begins.  The screen will turn a very light color and the Tools
  135. Window will disappear.  This is to be expected!  When the printout is
  136. done, the screen will return to normal.
  137.     The standard printout has a grey field in the background of the
  138. graph.  I have found that this makes the graph somewhat more soothing.
  139. If you prefer a black and white graph, disable the "Grey Field on Print?"
  140. check box gadget in the Palette Window.
  141.  
  142.                 Palette Window
  143.  
  144. The Palette window allows you to change the flow colors.  It is a semi-
  145. standard window with slider gadgets to adjust the palette for the six flow
  146. colors.  You have probably used something like this before if you've done
  147. much with your Amiga.
  148.     When you are done, or if you've changed your mind, you can press
  149. either the check gadget in the lower left or the cross-out gadget in the
  150. lower right.
  151.     The default flow colors are shades of grey.  I've found that
  152. experimenting can produce really nice results.  Being able to see the flow
  153. is a powerful tool in the study of differential equations, so this is a
  154. nice feature (if you don't mind my tooting my horn :).
  155.  
  156.     The top row of boxes allow you to select which color you want to
  157. change.  Notice that, when animating, the lead flow color is the one on
  158. the left, the next flow color is the one to the right of that, and so on.
  159.     The three slider gadgets allow you to change, from top to bottom,
  160. the red value of the color, the green value of the color, and the blue
  161. value of the color.  Naturally, they only affect the color in the box
  162. currently selected (like most of the gadgets, selected means "looks
  163. pressed in").
  164.     In the lower center of the window is a check box gadget labeled
  165. "Grey Field on Print?"  This determines whether you have a grey background
  166. when you print out your graph.  If you prefer a black and white graph,
  167. disable this feature.  (It is disabled when there is no check in the box.)
  168.  
  169.                    Equation Window
  170.  
  171. The Equation Window allows you to change the differential equations x' and
  172. y'.  It presents you with two string prompts, a check gadget and a
  173. cross-out gadget.
  174.     The two string prompts are for the two different differential
  175. equations: x' and y'.  In the equations, you may use the variables "x" or
  176. "y", specifiy a constant number (e.g.: -2.256), or use one of the functions
  177. defined below.
  178.     You should note the following:
  179.     
  180.     a> Precedence rules operate as in standard mathematics: unary
  181.        operators are highest (exponents, functions like sine,
  182.        cosine, etc.), followed by multiplication and division,
  183.        followed by addition and subtraction.
  184.     b> The interpreter does NOT have very strong error checking!
  185.        While it ishouldui recover from most errors (though the graph
  186.        may look peculiar), it may simply stop running if you
  187.        make a mistake!  Be careful and you should never have
  188.        this problem, but you may.  If it idoesui happen, reset
  189.        your Amiga and try again.  If you are certain you are
  190.        having trouble with the program, reach me at one of the
  191.        addresses listed in General Info and I will attend to the
  192.        matter right away.
  193.     c> Naturally, there are the standard big four: +, -, *, /.
  194.        There is also the ^ function, indicating exponentiation.
  195.        You may also use any of the following functions:
  196.             sin        sine
  197.             cos        cosine
  198.             tan        tangent
  199.             asin        arcsine
  200.             acos        arccosine
  201.             atan        arctangent
  202.             ln        natural logarithm
  203.             log        common logarithm
  204.             exp        exponential (e^whatever)
  205.  
  206. Some examples:
  207.     x^2 + 4*x + 4
  208.     asin (x * 2)
  209.     3 + x^2
  210.     -y + x * (x^2 + y^2 - 1)^2
  211.     -4y + 2 * x * y - 8
  212.  
  213. Please note that the interpreter will not understand if you leave out the
  214. multiplication sign, as is common in mathematics (2x, 2sinx, 2(x + y)).
  215. You must be careful not to do this!  If the interpreter stumbles on this,
  216. it won't halt the program, but simply confuse you because the answer will
  217. be wrong.
  218.  
  219.  
  220.  
  221.                 Scale Window
  222.  
  223. The Scale window allos you to zoom in on any point of interest in your
  224. graph.  It contains four string gadgets which request the scale and new
  225. origin.  It contains check gadget and a cross-out gadget.
  226.  
  227.     The top two string gadgets request the new scale.  The "scale" is
  228. the length of the positive axis; for example; an x scale of 10.0 means your
  229. graph window will graph x values from -10.0 to +10.0.
  230.     The lower two string gadgets request the new origin.  This means
  231. the program want to know where the center of the graph window is on the x-y
  232. plane.  The default is (0,0), just as in regular Cartesian graphs.  You can
  233. specify any number you like.
  234.  
  235.  
  236.                 Animating
  237.  
  238. Animating is accomplished in one of two ways.  The program always animates
  239. the flow briefly after drawing a new trajectory.  If you don't want to
  240. draw a new trajectory but would still like to see the flow, you can click
  241. on an existing trajectory and GraphDQ will animate the flow.
  242.  
  243.  
  244.                 Run-Time Help
  245.  
  246. GraphDQ offers a modicum of run-time help, though nothing as comprehensive
  247. or fancy as this guide.  This is accessed by pressing the button in the
  248. Tools Window that looks like a question mark.
  249.  
  250.  
  251.  
  252.                   Quitting
  253.  
  254. There are two ways to quite the program (not that you'd want to :).  The
  255. first is to press a key while the pointer looks like a cross-hair.  The
  256. second is to click on the quitting gadget, located in the Tools Window.
  257.  
  258.  
  259.                          The Check and Cross Gadgets
  260.  
  261. You will see the check and cross gadgets on several windows in this
  262. program.  I call them this because that is what they look like: one is a
  263. check, the other a cross.  Clicking on the check indicates that "Yes, I
  264. like what I've done; accept the changes (if any) and let's get back to
  265. work", while clicking on the cross indicates that "Ouch- I really don't
  266. like this!  Cancel all changes!"
  267.  
  268.  
  269.                    Troubleshooting
  270.  
  271. You should not have too much trouble with this program if you follow the
  272. directions.  If you do and none of the suggestions below help, contact
  273. the author at the address given inGeneral Info (GenInfo.
  274.  
  275. GraphDQ won't start.
  276.     GraphDQ should run on any Amiga running AmigaDOS2.0 or higher,
  277. except possibly 512k machines.  Try to free up some memory.
  278.  
  279. GraphDQ crashes the computer while it's graphing.
  280.     Increase the stack allocated to GraphDQ.  You can do this by
  281. changing the preset value on the icon.
  282.  
  283. GraphDQ won't print.
  284.     Make sure you've assigned a TOOLS: drawer wherein Commodore's
  285. GraphicDump is located.  If you want to use a different screen dump program,
  286. you will need to make an alias or rename it to GraphicDump.
  287.  
  288. GraphDQ won't graph my equation correctly.
  289.     Make sure you're using standard mathematical notation as described
  290. in the Equation Window section.  If it's still not working right, contact
  291. the author (me).  Maybe, even, there's not enough memory; close some other
  292. application and try GraphDQ again.
  293.  
  294. GraphDQ won't graph my equation at iallui and stops responding.
  295.     This shouldn't happen.  <gulp!>  Make sure your equation is legal;
  296. probably there's a typo.  In either case, contact me and tell me what
  297. equation you're trying to graph.  Perhaps there isn't enough memory; close
  298. some other application and try GraphDQ again.
  299.  
  300.  
  301.                    Acknowledgements
  302.  
  303.     My Lord and Savior Jesus Christ, for having created me with
  304. ability and willingness to work.
  305.     Armadillo Software, for their Benchmark Modula-2 compiler..
  306.     Niklaus Wirth, for Modula-2.
  307.     P.D. Terry, for one of the best books on teaching one how to
  308. program: An Introduction to Programming with Modula-2, published by
  309. Addison-Wesley.
  310.     Commodore-Amiga, Inc., for the Amiga and AmigaGuide. Let's hope
  311. things look up for the wonderful Amiga community!
  312.     Dr. Lawrence Perko, at Northern Arizona University, for the
  313. Differential Equations class, and for his book.  I learned a great deal
  314. from both, typos and all... :)  For those who are interested, the book is
  315. called Differential Equations and Dynamical Systems.  Get the 2nd
  316. or, if available, the 3rd edition.  Springer-Verlag publishes it.
  317.     Dr. Vanessa Job, at Marymount University, for teaching me
  318. to think and use my head.
  319.     And last, but not least, my parents, for starting it all with
  320. a TRS-80 Color Computer.  Way back when 16K was hot stuff and 64K was what
  321. dreams were made of...
  322.